package aps.module_Core;

//APS
import aps.module_Fusion.TileEntityTokamakGenerator;
//import aps.module_LaserGrid.TileEntityLaserGridNode;
import aps.module_Machines.TileEntityEnergyDirector;
import aps.module_Machines.TileEntityEnergyStore;
import aps.module_Machines.TileEntityGrinder;
import aps.module_Machines.TileEntityPoweredFurnace;
//import aps.module_SETS.TileEntitySETSNode;

import net.minecraft.src.Block;
//Vanilla minecraft
import net.minecraft.src.ItemBlock;
import net.minecraft.src.ItemStack;

public class ItemBlockAPSMeta extends ItemBlock
{
	int blockID;
	
	public ItemBlockAPSMeta(int i) {
		super(i);

		this.blockID = i + 256;
		
        setHasSubtypes(true);
        setMaxDamage(0);	
	}

	@Override
	public int getMetadata(int i) {return i;}

	@Override
	public String getItemNameIS(ItemStack itemstack) {
		if (itemstack.getItem().shiftedIndex == module_Core.APSMetaBlockEnergy.blockID && module_Core.APSMetaSubs[itemstack.getItemDamage()] != null)
			return module_Core.APSMetaSubs[itemstack.getItemDamage()].getInternalItemName();
		else if (itemstack.getItem().shiftedIndex == module_Core.APSMetaBlockMachine.blockID && module_Core.APSMetaSubs[itemstack.getItemDamage() + 16] != null)
			return module_Core.APSMetaSubs[itemstack.getItemDamage() + 16].getInternalItemName();
		else
			return "Unknown Block";
	}
}